package com.hzsoft.sys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hzsoft.sys.entity.SysRole;
import com.hzsoft.sys.mapper.SysRoleMapper;
import com.hzsoft.sys.service.SysRoleService;


@Service("sysRoleService")
public class SysRoleServiceImpl implements SysRoleService {
	
	private SysRoleMapper sysRoleMapper;
	
	public SysRoleMapper getSysRoleMapper() {
		return sysRoleMapper;
	}
	@Autowired
	public void setSysRoleMapper(SysRoleMapper sysRoleMapper) {
		this.sysRoleMapper = sysRoleMapper;
	}
	@Transactional
	public int insert(SysRole record) {
		// TODO Auto-generated method stub
		return sysRoleMapper.insert(record);
	}
	@Transactional
	public int insertSelective(SysRole record) {
		// TODO Auto-generated method stub
		return sysRoleMapper.insertSelective(record);
	}

	public int updateByPrimaryKeySelective(SysRole record) {
		// TODO Auto-generated method stub
		return sysRoleMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(SysRole record) {
		// TODO Auto-generated method stub
		return sysRoleMapper.updateByPrimaryKey(record);
	}
	
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<SysRole> listPageRole(SysRole role) {
		// TODO Auto-generated method stub
		return sysRoleMapper.listPageRole(role);
	}
	public int deleteByPrimaryKey(String roleId) {
		// TODO Auto-generated method stub
		return sysRoleMapper.deleteByPrimaryKey(roleId);
	}
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public SysRole selectByPrimaryKey(String roleId) {
		// TODO Auto-generated method stub
		return sysRoleMapper.selectByPrimaryKey(roleId);
	}
	public List<SysRole> selectAll() {
		// TODO Auto-generated method stub
		return sysRoleMapper.selectAll();
	}

	
}
